package principle.inversion;

public class Inversion {
}

interface IReceiver {
    String getInfo();
}

class Email implements IReceiver {
    @Override
    public String getInfo() {
        return null;
    }
}

class WeXin implements IReceiver {
    @Override
    public String getInfo() {
        return null;
    }
}

class Person {
    public void receive(IReceiver re) {
        System.out.println(re.getInfo());
    }
}